public class Test6 {
    public static int find(int[] arr){
        int ret=0;
        for(int i=0;i<arr.length;i++){
            ret=ret^arr[i];
        }
        return ret;
    }
    public static void main(String[] args) {
        int[] arr={4,1,2,1,2};
        int ret=find(arr);
        System.out.println(ret);
    }
}
